//
//  BDNetworkingServer.h
//  BadBoy
//
//  Created by 余勇 on 2017/3/8.
//  Copyright © 2017年 niusaibing. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <ReactiveObjC/ReactiveObjC.h>
@interface BDNetworkingServer : NSObject

+ (NSInteger)getErrorCodeWithError:(nullable NSError *)error;

+ (nonnull RACCommand *)yy_GET:(nonnull NSString *)url
                    parameters:(nullable id)parameters
                    validation:(nullable NSString *)validation
      automaticProcessingError:(BOOL)automaticProcessingError;

+ (RACCommand *_Nullable)v2_GET:(NSString *_Nullable)url parameters:(id _Nullable )parameters validation:(NSString *_Nullable)validation automaticProcessingError:(BOOL)automaticProcessingError;

+ (nonnull RACCommand *)yy_POST:(nonnull NSString *)url
                     parameters:(nullable id)parameters
                     validation:(nullable NSString *)validation
       automaticProcessingError:(BOOL)automaticProcessingError;

+ (nonnull RACCommand *)yy_PUT:(nonnull NSString *)url
                     parameters:(nullable id)parameters
                     validation:(nullable NSString *)validation
      automaticProcessingError:(BOOL)automaticProcessingError;

+ (nonnull RACCommand *)yy_DELETE:(nonnull NSString *)url
                       parameters:(nullable id)parameters
                       validation:(nullable NSString *)validation
         automaticProcessingError:(BOOL)automaticProcessingError;

+ (nullable RACCommand *)yy_POST:(nullable NSString *)URLString
                      parameters:(nullable id)parameters
                      validation:(nullable NSString *)validation
                            name:(nullable NSString *)name
                       dataArray:(nullable NSArray *)dataArray
        automaticProcessingError:(BOOL)automaticProcessingError;

+ (nullable RACCommand *)yy_POST:(nullable NSString *)URLString
                      parameters:(nullable id)parameters
                      validation:(nullable NSString *)validation
                       nameArray:(nullable NSArray *)nameArray
                       dataArray:(nullable NSArray *)dataArray
        automaticProcessingError:(BOOL)automaticProcessingError;

+ (nullable RACCommand *)v2_POST:(nullable NSString *)URLString
                      parameters:(nullable id)parameters
                      validation:(nullable NSString *)validation
                       nameArray:(nullable NSArray *)nameArray
                       dataArray:(nullable NSArray *)dataArray
        automaticProcessingError:(BOOL)automaticProcessingError;

+ (nullable RACCommand *)yy_Application_PUT:(nullable NSString *)url
                        parameters:(nullable id)parameters
                        validation:(nullable NSString *)validation
          automaticProcessingError:(BOOL)automaticProcessingError;
@end
